package LeetCode.month04.day91;

/**
 * @author 16778
 * @date 2025/10/31 8:12
 * @description
 */
public class No3289 {
    public int[] getSneakyNumbers(int[] nums) {
        int[] res = new int[2];
        int[] count = new int[nums.length];
        int index = 0;
        for (int num : nums) {
            count[num]++;
            if (count[num] > 1) {
                res[index++] = num;
            }
        }
        return res;
    }
}
